
/**
 * 在这里给出对类 Monster 的描述。
 * 
 * @作者（你的名字）
 * @版本（一个版本号或者一个日期）
 */
public class Monster
{
    private String name;
    private int life;
    private int attack;
    private int defense;
    
    public Monster(String name, int life, int attack, int defense)
    {
        this.name = name;
        this.life = life;
        this.attack = attack;
        this.defense = defense;
    }
    
    public String getName() {
        return this.name;
    }
    
    public void setLife(int hurt)
    {
        this.life += hurt;
    }
    
    public int getLife() 
    {
        return this.life;
    }
    
    public int getAttack() 
    {
        return this.attack;
    }
    
    public int getDefense() 
    {
        return this.defense;
    }
    
    // public String toString()
    // {
        // return name + "[" + cans + "]";
    // }
}
